﻿@using BTL.OnlineTestingSocial.Application.Facade;
@model List<BTL.OnlineTestingSocial.Application.Web.Infrastructure.ViewModels.QuestionGroupItemViewModel>

@{
    ViewBag.Title = "Index";
    ViewBag.Css = "Home.css";
    ViewBag.Js = "Home.js";
}


<div class="bgQuestionGroup_onHome" id="bgQuestionGroup_onHome" align="center">
    <div class="bgvertical_item bgvertical_item_container" id='vert_pic_item_1'> 
    </div>
    <div class="bgvertical_item bgvertical_item_container" id='vert_pic_item_2'> 
    </div>
    <div class="bgvertical_item bgvertical_item_last bgvertical_item_container" id='vert_pic_item_3'> 
    </div>

    <div style="display:none">
            @if (ViewData["cateId"] == null)
            {

                using (Ajax.BeginForm("getMoreQuestionGroup", "Home", new { },
                                new AjaxOptions { UpdateTargetId = "updatePic", OnBegin = "" }, new { style = "display:none", id = "frmUpdatePic" }))
                {
                    <input type="hidden" value="@ViewData["PageIndex"]" id="PageIndex" name="PageIndex" />
                }
            }
            else
            {
                using (Ajax.BeginForm("getMoreQuestionGroup", "Home", new { kind = "mode_bycateId", cateId = ViewData["cateId"] },
                                new AjaxOptions { UpdateTargetId = "updatePic", OnBegin = "" }, new { style = "display:none", id = "frmUpdatePic" }))
                {
                    <input type="hidden" value="@ViewData["PageIndex"]" id="PageIndex" name="PageIndex" />
                }
            }
       </div>

    <div id="updatePic" style="display:none">
        @{Html.RenderPartial("pvwQuestionGroupItem", Model);}       
    </div>
    
</div>

<script>
    getMoreQuestions();
</script>